// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * EavFormType generated by hbm2java
 */
@Entity
@Table(name = "eav_form_type", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"code", "theme", "store_id" }))
public class EavFormType implements java.io.Serializable {

	private Short typeId;
	private CoreStore coreStore;
	private String code;
	private String label;
	private short isSystem;
	private String theme;
	private Set eavFormElements = new HashSet(0);
	private Set eavFormFieldsets = new HashSet(0);
	private Set eavEntityTypes = new HashSet(0);

	public EavFormType() {
	}

	public EavFormType(CoreStore coreStore, String code, String label,
			short isSystem) {
		this.coreStore = coreStore;
		this.code = code;
		this.label = label;
		this.isSystem = isSystem;
	}

	public EavFormType(CoreStore coreStore, String code, String label,
			short isSystem, String theme, Set eavFormElements,
			Set eavFormFieldsets, Set eavEntityTypes) {
		this.coreStore = coreStore;
		this.code = code;
		this.label = label;
		this.isSystem = isSystem;
		this.theme = theme;
		this.eavFormElements = eavFormElements;
		this.eavFormFieldsets = eavFormFieldsets;
		this.eavEntityTypes = eavEntityTypes;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "type_id", unique = true, nullable = false)
	public Short getTypeId() {
		return this.typeId;
	}

	public void setTypeId(Short typeId) {
		this.typeId = typeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "code", nullable = false, length = 64)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "label", nullable = false)
	public String getLabel() {
		return this.label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	@Column(name = "is_system", nullable = false)
	public short getIsSystem() {
		return this.isSystem;
	}

	public void setIsSystem(short isSystem) {
		this.isSystem = isSystem;
	}

	@Column(name = "theme", length = 64)
	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "eavFormType")
	public Set getEavFormElements() {
		return this.eavFormElements;
	}

	public void setEavFormElements(Set eavFormElements) {
		this.eavFormElements = eavFormElements;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "eavFormType")
	public Set getEavFormFieldsets() {
		return this.eavFormFieldsets;
	}

	public void setEavFormFieldsets(Set eavFormFieldsets) {
		this.eavFormFieldsets = eavFormFieldsets;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "eav_form_type_entity", catalog = "magento", joinColumns = { @JoinColumn(name = "type_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "entity_type_id", nullable = false, updatable = false) })
	public Set getEavEntityTypes() {
		return this.eavEntityTypes;
	}

	public void setEavEntityTypes(Set eavEntityTypes) {
		this.eavEntityTypes = eavEntityTypes;
	}

}
